from rest_framework import serializers

from app.models import Cart, Order


class CartIdSerializer(serializers.Serializer):
    cart_id = serializers.PrimaryKeyRelatedField(queryset=Cart.objects.all())


class PreOrderAddSerializer(serializers.Serializer):
    carts = CartIdSerializer(many=True)


class PreOrderReAddSerializer(serializers.Serializer):
    order_id = serializers.PrimaryKeyRelatedField(queryset=Order.objects.all())

# class PreOrderResponseSerializer(serializers.Serializer):
#     pre_order_id = serializers.IntegerField()
#     address = MailingAddressSerializer(required=False)
#     products = ProductSerializer(many=True)
#     amount = serializers.IntegerField(min_value=0)
#     pay_methods = PayMethodSerializer(many=True)
